<template>
  <div>
    <p>AAA</p>
    <p>{{ count }}</p>
  </div>
</template>

<script>
export default {
  name: "AChild",
  data() {
    return {
      count: 0,
    };
  },
  mounted() {
    // 绑定事件
    this.$bus.$on("setCount", () => {
      this.count++;
    });
  },
};
</script>

<style></style>
